#include<stdio.h>
int main ()
{
int year,month,day,num,rest,year2,month2,day2,num2,result;
num=0;
scanf("%d-%d-%d\n%d-%d-%d",&year,&month,&day,&year2,&month2,&day2);
switch (month)
{

case 01:
num=day;
break;
case 02:
num=day+31;
break;
case 03:
num=day+59;
break;
case 04:
num=day+90;
break;
case 05:
num=day+120;
break;
case 06:
num=day+151;
break;
case 07:
num=day+181;
break;
case 8:
num=day+212;
break;
case 9:
num=day+243;
break;
case 10:
num=day+273;
break;
case 11:
num=day+304;
break;
case 12:
num=day+334;
break;
default:
printf("error!\n");
return 0;



}
rest=365-num;
if ((year%4==0&&year%100!=0||year%400==0)&&month>=3)
{
num=num+1;

}
if (year%4==0&&year%100!=0||year%400==0)
{
rest=366-num;
}


switch (month2)
{

case 01:
num2=day2;
break;
case 02:
num2=day2+31;
break;
case 03:
num2=day2+59;
break;
case 04:
num2=day2+90;
break;
case 05:
num2=day2+120;
break;
case 06:
num2=day2+151;
break;
case 07:
num2=day2+181;
break;
case 8:
num2=day2+212;
break;
case 9:
num2=day2+243;
break;
case 10:
num2=day2+273;
break;
case 11:
num2=day2+304;
break;
case 12:
num2=day2+334;
break;
default:
printf("error!\n");
return 0;



}
if ((year2%4==0&&year2%100!=0||year2%400==0)&&month2>=3)
{
num2=num2+1;

}
int a;
int b;
a=year2-year-1;
result=a*365+rest+num2;
for (b=year+1;b<=year2;b++)
{
if (b%4==0&&b%100!=0||b%400==0)
{
result++;
}
}
printf("%d",result);
return 0;
}

